package com.ash.client;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * <p>调用异常处理</p>
 *
 */
@Component
public class ProviderServiceFallbackFactory implements FallbackFactory<ProviderServiceApi> {


    @Override
    public ProviderServiceApi create(Throwable cause) {
        return new ProviderServiceApi() {

            @Override
            public String sayHello(String name) {
                return "default";
            }
        };
    }
}
